# -*- coding: utf-8 -*-
# @Author: sunlongpeng
# @Date:   2017-04-25 11:04:52
# @Last Modified by:   slp
# @Last Modified time: 2017-08-24 10:35:57


def binprint(a):
	s = bin(a)
	l = len(s)
	for i in xrange(len(s)-1, 1, -1):
		print "%2d"%(i-2),
	print ""

	ss = s[0:]
	for i in xrange(2, len(s)):
		print "%2s"%(s[i]),
	print ""

a = 3145737
print "%#x"%(a)
print bin(a)

0x2230000
print bin(0x800003c5)

binprint(0x800003c5)
binprint(0x801003cd)
binprint(0x530)

binprint(104096500)

binprint(0xd2a04018)